/**
 *	@author: Francis Germiline Veto
 *	date created: March 19, 2006
 *	version: 1.00.01
 * modified:
 *		March 29, 2006
 *			kit - included TExtChunk versions of String data; added domain
 */

package text.obj;

public class ChunkPair {
	private String strSource, strTarget;
	private String strDomain;
	private TExtChunk cSource, cTarget;
	
	public ChunkPair(String strSource, String strTarget, String strDomain) {
		this.strSource = strSource;
		this.strTarget = strTarget;
		this.strDomain = strDomain;
		if(strSource.equals("") || strSource == null)
			cSource = new TExtChunk(strDomain);
		else
			cSource = new TExtChunk(strSource, strDomain);
		if(strTarget.equals("") || strTarget == null)
			cTarget = new TExtChunk(strDomain);
		else
			cTarget = new TExtChunk(strTarget, strDomain);
	}
	
	public ChunkPair(TExtChunk cSource, TExtChunk cTarget, String strDomain) {
		strSource = cSource.toString();
		strTarget = cTarget.toString();
		this.cSource = cSource;
		this.cSource.setDomain(strDomain);
		this.cTarget = cTarget;
		this.cTarget.setDomain(strDomain);
		this.strDomain = strDomain;
	}
	
	public String getSourceStr() {
		return strSource;
	}
	
	public String getTargetStr() {
		return strTarget;
	}
	
	public TExtChunk getSourceChunk() {
		return cSource;
	}
	
	public TExtChunk getTargetChunk() {
		return cTarget;
	}
	
	public String getDomain() {
		return strDomain;
	}
}